#version 450

layout (location = 0) in vec2 position;
layout (location = 1) in vec3 color;
layout (location = 2) in vec2 texcoords;

layout(binding = 1) uniform UniformBufferObject {
    mat4 model;
    mat4 view;
    mat4 proj;
} ubo;

layout (push_constant) uniform Push
{
    vec2 offset;
} push;

layout (location = 0) out vec3 outColor;
layout (location = 1) out vec2 outTexcoords;

void main() 
{
    gl_Position = ubo.proj * ubo.view * ubo.model * vec4(position + push.offset, 0.0, 1.0);
    outColor = color;
    outTexcoords = texcoords;
}
